package ch07_GUI编程;

import javax.swing.*;
import java.awt.*;

public class FlowLayoutDemo {

	public static void main(String[] args) {
		new FlowLayoutDemo().init();
	}
	void init() {
		BaseFrame f = new BaseFrame("FlowLayout Demo");
		f.setLayout(new FlowLayout());
		JButton[] btns = new JButton[8];
		for (int i = 0; i < btns.length; i++) {
			f.add(new JButton("按钮"+ (i+1)));
		}
		f.showMe();
	}

}
